#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#include <math.h>
int main() {
    int n, s, a = 0, chu, yu, r, jishu, d = 0;
    scanf("%d", &n);
    s = n;
    while (s > 0)
    {
        s /= 10;
        a++;
    }
    jishu = a;
    while (n >= 0)
    {
        chu = n;
        chu = chu / pow(10, a - 1);
        if (chu % 2 == 0)
            d *= 10;
        else
            d = d * 10 + 1;
        r = pow(10, a - 1);
        n = n % r;
        a--;
        jishu--;
        if (jishu == 0)
            break;
    }
    printf("%d", d);
    return 0;
}